package OddMuse::Database;

=head1 NAME

OddMuse::Database - Perl Module for OddMuse Text Logging

=head1 DESCRIPTION

This module provides a text logging facility that becomes more verbose as the
$debug variable in L<OddMuse::Database> increases.

=cut

$VERSION = ( q$Revision: 31 $ ) =~ /(\d+)/g;
#use strict; Fails, wierd.

=head1 SYNOPSIS

  use OddMuse::Database;
  log1('A bunch of text');

=head1 FUNCTIONS

=over 4

=item * log1('text');

Displays text that might be useful to a script.  "Done.", etc

=cut

sub log1 {
    return
      if ( ( $debug < 1 ) or ( $debug == 4 ) );
    my $msg = shift;
    print "$msg";
}

=item * log2('text');

Displays text that would be useful to a human watching the output.

=cut

sub log2 {
    return
      if ( ( $debug < 2 ) or ( $debug == 4 ) );
    my $msg = shift;
    print "$msg";
}

=item * log3('text');

Display verbose output, useful for debugging.

=cut

sub log3 {
    return
      if ( ( $debug < 3 ) or ( $debug == 4 ) );
    my $msg = shift;
    print "$msg";
}

=item * log4('text');

Usually used only to provide data structure dumping.

=cut

sub log4 {
    return if ( $debug < 4 );
    my $msg = shift;
    print "$msg";
}

1;

__END__

=back

=head1 BUGS AND LIMITATIONS

No bugs have been reported.

Please report any bugs or feature requests to C<cmauch@gmail.com>

=head1 AUTHOR

Charles Mauch <cmauch@gmail.com>

=head1 LICENSE

Copyright (c) 2006 Charles Mauch

This program is free software; you can redistribute it and/or modify it under
the terms of the GNU General Public License as published by the Free Software
Foundation; either version 2 of the License, or (at your option) any later
version.

This program is distributed in the hope that it will be useful, but WITHOUT ANY
WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A
PARTICULAR PURPOSE.  See the GNU General Public License for more details.

You should have received a copy of the GNU General Public License along with
this program; if not, write to the Free Software Foundation, Inc., 51 Franklin
Street, Fifth Floor, Boston, MA  02110-1301, USA.

=head1 SEE ALSO

perl(1).  OddMuse::Database(1).

=cut

# $Id: Logging.pm 31 2006-09-29 06:21:37Z cmauch $
